import {createWebHashHistory, createRouter} from 'vue-router'
const routes = [
    {
        path: '/',
        redirect: '/manage'
    },
    {
        path: '/login',
        component: () => import('/@/views/Login.vue')
    },
    {
        path: '/manage',
        component: () => import('/@/views/Layout.vue'),
        redirect: '/manage/shop',
        children: [
            {
                path: 'shop',
                component: () => import('/@/views/shop/index.vue')
            },
            {
                path: 'devices',
                component: () => import('/@/views/devices/index.vue')
            },

            {
                path: 'customers',
                component: () => import('/@/views/customers/index.vue')
            },
            {
                path: 'departments',
                component: () => import('/@/views/departments/index.vue')
            },
            {
                path: 'roles',
                component: () => import('/@/views/roles/index.vue')
            },
            {
                path: 'menus',
                component: () => import('/@/views/menus/index.vue')
            },
            {
                path: 'users',
                component: () => import('/@/views/users/index.vue')
            },
            {
                path: 'statistics',
                component: () => import('/@/views/statistics/index.vue')
            },
            {
                path: 'custom-amount',
                component: () => import('/@/views/custom-amount/index.vue')
            },
            {
                path: 'consume-record',
                component: () => import('/@/views/consume-record/index.vue')
            },
        ]
    }
]
const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
export default router
